//
//  OrderTableViewCell.m
//  YJRenter
//
//  Created by 文彬 on 2018/7/1.
//  Copyright © 2018年 文彬. All rights reserved.
//

#import "OrderTableViewCell.h"

@implementation OrderTableViewCell


- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.clipsToBounds = YES;
    self.selectionStyle = UITableViewCellSelectionStyleNone;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

- (void)showTimeLabel:(BOOL)showTime{
    if (showTime) {
        self.timeLabel.hidden = NO;
        
        [self.dateLabel remakeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(@10);
            make.right.equalTo(@-10);
            make.height.equalTo(@20);
            make.top.equalTo(@10);
        }];
        
        [self.timeLabel remakeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(@10);
            make.right.equalTo(@-10);
            make.height.equalTo(@20);
            make.bottom.equalTo(@-10);
        }];
    }
    else{
        self.timeLabel.hidden = YES;
        
        [self.dateLabel remakeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(@10);
            make.right.equalTo(@-10);
            make.height.equalTo(@20);
            make.centerY.equalTo(self.blackBgView.centerY);
        }];
    }
}
@end
